package com.fadadianqi.mall.dao.ibatis;

import com.fadadianqi.commons.GenericDAOSuport;
import com.fadadianqi.mall.dao.OrderItemDAO;
import com.fadadianqi.mall.orders.model.OrderItem;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by LightHuangfu
 * User: LightHuangfu
 * Date: 14-2-23
 * Time: 下午11:41
 */
@Component
public class OrderItemDAOImpl extends GenericDAOSuport<String, OrderItem> implements OrderItemDAO {
    @Override
    protected Class<OrderItem> getObjectClass() {
        return OrderItem.class;
    }

    @Override
    protected String getTableName() {
        return "mall_order_item";
    }

    @Override
    public List<OrderItem> findAll() {
        return super.findAll(null);
    }

    @Override
    public void removeOrderItem(String id) {
        super.removeByProperty("id", id);
    }
}
